package vue;

import java.awt.Graphics;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *Le panel qui affiche le splashscreen
 * @author Shaance
 */
public class SplashPanel extends JPanel {

    public SplashPanel() {
        this.setLayout(null);
        JLabel j = new JLabel();
        ImageIcon ii = new ImageIcon("loading.gif");
        j.setIcon(ii);
        j.setLocation(250, 80);
        j.setSize(200, 200);
        this.add(j);
        this.repaint();
        this.revalidate();
    }

    @Override
    public void paintComponent(Graphics g) {
        try {
            Image img = ImageIO.read(new File("Splashscreen.png"));
            g.drawImage(img, 0, 0, this);
        } catch (IOException e) {
        }
    }

}
